package com.jiyun.vo;

import lombok.Data;
import lombok.ToString;

@Data
@ToString
public class ResultResponse<T> {
    public  String Code;
    public String Message;
    public T data;

    public static ResultResponse success(Object data){
        ResultResponse resultResponse = new ResultResponse<Object>();
        resultResponse.setCode("1");
        resultResponse.setMessage("SUCCESS");
        resultResponse.setData(data);
        return resultResponse;
    }
    public static ResultResponse<Object> error(){
        ResultResponse resultResponse = new ResultResponse<Object>();
        resultResponse.setCode("2");
        resultResponse.setMessage("ERROR");
        return resultResponse;
    }

}
